/**
 * Copyright (c) 2007,中企动力华南研发中心<br>
 * All rights reserved.
 */
package com.ce.pms.charge.dao.impl;

import java.util.List;

import org.hibernate.Query;

import com.ce.pms.base.dao.impl.PmsBaseDaoImpl;
import com.ce.pms.charge.dao.IChargeUnpaidStatisticsDao;
import com.ce.pms.charge.model.ChargeUnpaidStatisticsDO;
import com.ce.pms.common.annotation.AssociatedBuildingQuery;
import com.ce.pms.common.annotation.AssociatedPrecinctQuery;

/**
 * 功能描述：<br>
 * @author 罗军林 创建日期：2008-9-27
 */
public class ChargeUnpaidStatisticsDaoImpl extends PmsBaseDaoImpl<ChargeUnpaidStatisticsDO> implements
		IChargeUnpaidStatisticsDao {

	@AssociatedPrecinctQuery(alias="up", beginStr=" and ", endStr=" ", insertAfterPoint="where 1=1",property4Precinct="chargePrecinctId")
	public List<ChargeUnpaidStatisticsDO> queryUnpaidStatistics(int pageNo,	int pageSize) {
		int startRow=(pageNo-1) * pageSize;
		String hql=" FROM ChargeUnpaidStatisticsDO up where 1=1";
		Query query=createQuery(hql, null);
		query.setFirstResult(startRow);
		query.setMaxResults(pageSize);
		return query.list();
	}

}
